﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AcsCommon;

namespace YiShiService.Class
{
    public class KnowledgePoint : DbObject
    {
        public string IdPath
        {
            get { return dr["IdPath"]; }
            set { dr["IdPath"] = value; }
        }
        public string ParentId
        {
            get { return dr["ParentId"]; }
            set { dr["ParentId"] = value; }
        }
        public string Type
        {
            get { return dr["Type"]; }
            set { dr["Type"] = value; }
        }
        public string Name
        {
            get { return dr["Name"]; }
            set { dr["Name"] = value; }
        }
        public string Tip
        {
            get { return dr["Tip"]; }
            set { dr["Tip"] = value; }
        }
        public string NamePath
        {
            get { return dr["NamePath"]; }
            set { dr["NamePath"] = value; }
        }
        public string PointKey
        {
            get { return dr["PointKey"]; }
            set { dr["PointKey"] = value; }
        }
        public string Remark
        {
            get { return dr["Remark"]; }
            set { dr["Remark"] = value; }
        }
        public int SortIndex
        {
            get { return (dr["SortIndex"] == null || string.IsNullOrEmpty(dr["SortIndex"].Trim())) ? 0 : int.Parse(dr["SortIndex"]); }
            set { dr["SortIndex"] = value.ToString(); }
        }

        public KnowledgePoint(DbAccess db)
            : base(db, "Admin.KnowledgePoint")
        {
        }
        public override void Update()
        {
            base.Update("Admin.KnowledgePoint");
        }
    }
}
